package org.zjt.agent.generate.bytebuddy;
import lombok.extern.slf4j.Slf4j;
import net.bytebuddy.implementation.bind.annotation.*;

import java.lang.reflect.Method;

/**
 * Description:
 *
 * @author juntao.zhang
 * Date: 2018-07-05 下午9:08
 * @see
 */
@Slf4j
public class InstanceMethodInvoker {


    @RuntimeType
    public  Object intercept(@This Object obj, @AllArguments Object[] allArguments, @Origin Method method, @Morph OverrideCallable callable)  {
        Object ret = null;

        log.info("-------------------------------------------------------------------");

        ret = callable.call(allArguments);

        return ret;
    }

}
